package dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Properties;

public class Conn {
    public static Connection getConn() throws Exception {

        Properties properties = new Properties();
        //建立连接
        Connection conn = null;
        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
        } catch (Exception e) {
            e.printStackTrace();
        }

        conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/shuai?serverTimezone=UTC", "root", "root");

        return conn;
    }

}
